<!Doctype>
<script src='prototype.js'></script>
<body>
	<select id='xyz'>
		<option value='apple'>apple</option>
		<option value='orange'>orange</option>
		<option value='apple1'>apple</option>
		<option value='orange1'>orange</option>
		<option value='apple2'>apple</option>
		<option value='orange2'>orange</option>
		<option value='apple3'>apple</option>
		<option value='orange3'>orange</option>
		<option value='apple4'>apple</option>
		<option value='orange4'>orange</option>
		<option value='apple5'>apple</option>
		<option value='orange5'>orange</option>
		<option value='apple6'>apple</option>
		<option value='orange6'>orange</option>
		<option value='mango'>mango</option>


		<option value='chitta'>apple</option>
		<option value='orange'>orange</option>
		<option value='apple1'>apple</option>
		<option value='orange1'>orange</option>
		<option value='apple2'>apple</option>
		<option value='orange2'>orange</option>
		<option value='apple3'>apple</option>
		<option value='orange3'>orange</option>
		<option value='apple4'>apple</option>
		<option value='orange4'>orange</option>
		<option value='apple5'>apple</option>
		<option value='orange5'>orange</option>
		<option value='apple6'>apple</option>
		<option value='orange6'>orange</option>
		<option value='mango'>mango</option>



		<option value='apple'>apple</option>
		<option value='orange'>orange</option>
		<option value='apple1'>apple</option>
		<option value='orange1'>orange</option>
		<option value='apple2'>apple</option>
		<option value='orange2'>orange</option>
		<option value='apple3'>apple</option>
		<option value='orange3'>orange</option>
		<option value='apple4'>apple</option>
		<option value='orange4'>orange</option>
		<option value='apple5'>apple</option>
		<option value='orange5'>orange</option>
		<option value='apple6'>apple</option>
		<option value='orange6'>orange</option>
		<option value='mango'>mango</option>


		<option value='apple'>apple</option>
		<option value='orange'>orange</option>
		<option value='apple1'>apple</option>
		<option value='orange1'>orange</option>
		<option value='apple2'>apple</option>
		<option value='orange2'>orange</option>
		<option value='apple3'>apple</option>
		<option value='orange3'>orange</option>
		<option value='apple4'>apple</option>
		<option value='orange4'>orange</option>
		<option value='apple5'>apple</option>
		<option value='orange5'>orange</option>
		<option value='apple6'>apple</option>
		<option value='orange6'>orange</option>
		<option value='gthtt'>mango</option>
	</select>
	<input type='button' onclick='iterate()' value='iterate()'><br/>
	<input type='button' onclick='direct()' value='direct()'><br/>
</body>
<script>

	function iterate(){
		var st = (new Date()).getTime();
		var obj = null;
		var xyz = document.getElementById('xyz');
		for(var i=0; i<xyz.options.length; i++){
			if(xyz.options[i].value='gthtt'){
				obj = xyz.options[i].outerHTML;
				break;
			}
		}
		alert((new Date()).getTime()-st+'--'+obj);
	}

	function direct(){
		var st = (new Date()).getTime();
		var obj = $$('#xyz option[value="gthtt"]')[0].outerHTML;
		alert((new Date()).getTime()-st+'--'+obj);
	}	

</script>